import request from '@/router/axios';

//查询所有签名/模板
export const query = (param) => {
  return request({
    url: '/api/blade-email/file',
    method: 'get',
    params:param
  })
}
export const querySignList = (param) => {
  return request({
    url: '/api/blade-email/file',
    method: 'get',
    params:param
  })
}
//新增 签名/模板
export const save = (row) => {
  return request({
    url: '/api/blade-email/file',
    method: 'post',
    headers:{
      "Content-Type":"application/json"
    },
    data: JSON.stringify(row)
  })
}
//修改 签名/模板
export const update = (row) => {
  return request.put(`/api/blade-email/file/${row.id}`, row)
}
//删除 签名/模板
export const del = (id) => {
  return request.delete(`/api/blade-email/file/${id}`, {params: {id:id}})
}
//设置默认签名/模板
export const setDefault = (id) => {
  return request.put(`/api/blade-email/file/${id}/default`, {id:id})
}
//取消签名
export const cancelSign = (param) => {
  return request.put(`/api/blade-email/file/${param.id}/default/${param.enable}`)
}
